<?php

namespace common\repositories\myhtsq;

use Yii;
use common\error\ErrorCode;
use common\entities\myhtsq\RoleActionPackageEntity;
use common\repositories\BaseRepository;

class RoleActionPackageRepository extends BaseRepository {

    /**
     * 构造方法
     * @param unknown $config (optional)
     */
    public function __construct($config = []) {
        parent::__construct($config);
    }

    

    /**
     * 根据角色id,获取角色授权包
     * @param int $roleId 角色id
     * @return array
     */
    public static function getAllRoleActionPackageByRoleId($roleId) {
        return RoleActionPackageEntity::find()->where(['role_id' => $roleId])->all();
    }


}
